home *** CD-ROM | disk | FTP | other *** search
- type str_66 = string[66];
-
- var file_in: file of char;
- i: integer;
- ch: char;
- dbf_name, ndx_name: str_66;
-
- const blanks = ' ';
-
- function exist(file_name: str_66): boolean;
- var fil: file;
- begin
- assign(fil,file_name); {$I-} reset(fil); close(fil); {$I+} exist:=(ioresult=0);
- end;
-
- begin
- ndx_name:=paramstr(1)+'.ndx'; if exist(ndx_name) then begin
- assign(file_in,ndx_name); reset(file_in); seek(file_in,496); dbf_name:='';
- for i:=1 to 16 do begin read(file_in,ch); dbf_name:=dbf_name+upcase(ch); end;
- close(file_in);
- if exist(dbf_name) then writeln('The .DBF file for this index is: ',dbf_name)
- else begin
- writeln(dbf_name,' is given. If this is garbage, use INSERT.COM to tag');
- writeln('this index to its .DBF file.');
- end;
- end else begin
- writeln('PICKIT.COM retrieves the .DBF filename from the requested .NDX header.');
- writeln('The syntax is: PICKIT ndxfilename : without the extension.');
- writeln('The associated file is INSERT.COM');
- end;
- end.
-